< previous page page_372 next page >

Page 372
LISTING 16.3.CONTINUED
9f8044bafea36a1f728739c0bb58ef4c.gif
208: Optional argMessage As String, Optional argProgressTotal As   Long)
209:     'argProgressUnit represents the unit of measure
210:     'that let's the user know what's going on with a
211:     'task. argProgressTotal is the total number of
212:     'unit being processed
213:     If Not IsMissing(argMessage) And Len(argMessage) <> 0 Then
214:         theForm.StatusBar1.Panels(eStatusPanel.Message) _
215:             = argMessage
216:     End If
217:     If Not IsMissing(argProgressTotal) And _
218:     argProgressTotal <> 0 Then
219: theForm.StatusBar1.Panels(eStatusPanel.TotalUnitsProcessed) _
220:             = Of  & CStr(argProgressTotal) &  records
221:     End If
222:   theForm.StatusBar1.Panels(eStatusPanel.CurrUnitProcessed)= _   argProgressUnit
223:     theForm.Refresh
224: End Sub
225: Private Sub theTimer_Timer()
226:     theForm.StatusBar1.Panels(eStatusPanel.FreeForm).Text = Now
227: End Sub
228: Public Sub setTabs(argTabCount As Byte)
229:     enableTabStops False
230:     theForm.txtReportContents.SelTabCount = argTabCount
231: End Sub
232:
233: Public Sub enableTabStops(argValue As Boolean)
234:     'Ignore errors for controls without the TabStop property.
235:     On Error Resume Next
236:     ' Switch off the change of focus when pressing TAB.
237:     For Each Control In theForm.Controls
238:         Control.TabStop = argValue
239:     Next Control
240: End Sub
241:

Summary
In this lesson, you got an overview of the Reporting and Printing Subsystem. In particular, you learned some powerful techniques for making your reporting and printing code effective as well as reusable. You also received some guidelines for planning cyclical and ad hoc reporting tasks as well as additional tips on making the best of your reporting mechanism. Moreover, you learned about the three more readily available forms of

 
< previous page page_372 next page >

If you like this book, buy it!